<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" media="screen" charset="utf-8" rel="stylesheet" href="${ctx}commons/css/common.css" />
<title>登录页面</title>
<script type="text/javascript">
	function register() {
		window.open("register.htm");
	}
</script>
<style type="text/css">
	div{margin-left: 10px; margin-top: 10px; margin-right: 16px;}
</style>
</head>
<body>
	<span style="font-size: 2ex;float: right;margin-right: 16px;">
		<c:if test="${!empty success}">${message }</c:if>&emsp;
		<c:choose>
			<c:when test="${empty user }">
				<a href="login.htm">登录</a>
			</c:when>
			<c:otherwise>
				<a>${user.nickName }</a>&emsp;<a href="login.htm?action=LOGOUT">退出</a>
			</c:otherwise>
		</c:choose>
	</span>
	<div align="center">
		<img src="../img/start.png" alt="出发" style="float: left;width:42px; height:80px;margin-left: 10px;" />
		<span style="font-size: 2em; font-weight: bold; color: green;">${login }</span>
	</div>
	<br>
	<div align="right">
		<form action="login.htm" method="post">
			<input type="hidden" name="action" value="LOGIN" />
			<c:if test="${success != true && user == null}">
				<div>
					用户名：<input type="text" name="username" value="" /><br><br>
					密&emsp;码：<input type="password" name="password" value="" /><br><br>
					<span class="btn"><input type="submit" value="提交" /></span>&emsp;
					<span class="btn"><input type="button" value="注册" onclick="register()" /></span>
				</div>
			</c:if>
		</form>
	</div>
</body>
</html>